﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Usuario.aspx.cs" Inherits="Ocorrencia" Title=".:: SIGOT - Usuário" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="Content5" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
        <p>
    <asp:Button ID="Button2" runat="server" Font-Names="Trebuchet MS" 
                style="z-index: 1; left: 169px; top: 174px; position: fixed; height: 27px; width: 133px; " 
                Text="   Novo Usuário" Font-Size="9pt" onclick="Button2_Click" />
            <asp:Image ID="Image13" runat="server" 
                ImageUrl="~/imagens/fatia/formulario/adicionar.png" 
                
                style="z-index: 1; left: 30px; top: 27px; position: absolute; height: 22px; width: 24px" />
</p>
        <asp:Panel ID="Panel6" runat="server" 
            style="z-index: 1; left: 3px; top: 2px; position: absolute; height: 19px; width: 955px">
            <asp:Label ID="Label5" runat="server" Text="Cadastro:" Font-Bold="True" 
                Font-Names="Trebuchet MS" Font-Size="10pt" ForeColor="#000099"></asp:Label>
            <asp:Panel ID="Panel8" runat="server" 
                
                style="z-index: 1; left: 63px; top: 155px; position: absolute; height: 19px; width: 323px">
                <asp:Label ID="lbl_mensagem" runat="server" Font-Bold="True" 
                    Font-Names="Trebuchet MS" ForeColor="Red" 
                    Text="Não há registros com o nome informado!" Visible="False" 
                    Enabled="False"></asp:Label>
            </asp:Panel>
        </asp:Panel>
<p>
    &nbsp;</p>
<p>
    &nbsp;</p>
        <asp:Panel ID="Panel5" runat="server" 
            
            style="z-index: 1; left: 0px; top: 69px; position: absolute; height: 19px; width: 955px">
            <asp:Label ID="Label4" runat="server" Text="Pesquisa:" Font-Bold="True" 
                Font-Names="Trebuchet MS" Font-Size="10pt" ForeColor="#000099"></asp:Label>
            <asp:Panel ID="Panel7" runat="server" 
                
                style="z-index: 1; left: 27px; top: 25px; position: absolute; height: 19px; width: 37px">
                <asp:Label ID="Label6" runat="server" Font-Bold="False" 
                    Font-Names="Trebuchet MS" Font-Size="9pt" ForeColor="#000099" Text="Nome:"></asp:Label>
            </asp:Panel>
        </asp:Panel>
        <p>
            &nbsp;</p>
<p>
    <asp:Button ID="Button1" runat="server" Font-Names="Trebuchet MS" 
                style="z-index: 1; left: 340px; top: 89px; position: absolute; height: 27px; width: 133px" 
                Text="    Pesquisar Usuário" Font-Size="9pt" 
        onclick="Button1_Click" />
    <asp:Image ID="Image14" runat="server" 
        ImageUrl="~/imagens/fatia/formulario/pesquisar.png" 
        
        
        
        style="z-index: 1; left: 343px; top: 93px; position: absolute; height: 22px; width: 24px" />
</p>
<p style="margin-left: 40px">
    <asp:TextBox ID="filtro" runat="server" 
        
        
        
        style="z-index: 1; left: 207px; top: 240px; position: fixed; width: 263px; height: 19px;" 
        ontextchanged="filtro_TextChanged" ></asp:TextBox>
</p>
        <asp:Image ID="Image12" runat="server" 
            ImageUrl="~/imagens/fatia/masterPage/linha_horizontal.png" 
            
            style="z-index: 1; left: 5px; top: 59px; position: absolute; height: 3px; width: 946px;" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SIGOTConnectionString %>" 
        
            
            
            SelectCommand="SELECT [matricula], [nome], [login], [status] FROM [usuario] WHERE ([nome] LIKE @nome + '%') ORDER BY [nome]">
    <SelectParameters>
        <asp:ControlParameter ControlID="filtro" DefaultValue="%" Name="nome" 
            PropertyName="Text" Type="String"  />
    </SelectParameters>
</asp:SqlDataSource>
        <p style="height: 81px" title=".:: SIGOT - Usuário">
            <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" BorderColor="#DEDFDE" BorderWidth="1px" 
                CellPadding="1" DataKeyNames="matricula" DataSourceID="SqlDataSource1" 
                ForeColor="Black" GridLines="Vertical" Height="0px" 
                HorizontalAlign="Left" ShowFooter="True" style="z-index: 1; 
        left: 165px; top: 272px; position: fixed; height: 1px; width: 595px" 
                AllowPaging="True" RowHeaderColumn="nome" ToolTip="Editar Usuário" 
                onselectedindexchanged="GridView1_SelectedIndexChanged">
                <PagerSettings Mode="NextPreviousFirstLast" PageButtonCount="3" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <EmptyDataRowStyle HorizontalAlign="Center" Width="3px" />
                <Columns>
                    <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                        HeaderText="Editar" InsertVisible="False" 
                        SelectImageUrl="~/imagens/fatia/formulario/editar.png" SelectText="" 
                        ShowCancelButton="False" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                    <asp:BoundField DataField="matricula" HeaderText="Matricula" 
                        InsertVisible="False" ReadOnly="True" SortExpression="matricula" />
                    <asp:BoundField DataField="nome" HeaderText="Nome" SortExpression="nome" >
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="login" HeaderText="Login" SortExpression="login" />
                    <asp:BoundField DataField="status" HeaderText="Status" 
                        SortExpression="status" />
                </Columns>
                <FooterStyle BackColor="#DADADA" Font-Bold="True" Font-Size="4pt" 
                    ForeColor="White" Height="1px" Wrap="False" />
                <PagerStyle BackColor="#284775" ForeColor="White" Height="1px" 
                    HorizontalAlign="Center" Wrap="False" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" 
                    HorizontalAlign="Left" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                    Font-Names="Trebuchet MS" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </p>
        <p style="height: 81px">
            &nbsp;</p>


</asp:Content>


